package com.qd.panda.gas.station.ejiayou.resp.station;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * 价格
 *
 * @author sjk
 * @create 2023-02-10 11:08
 * @since 1.0.0
 */
@Data
@Accessors(chain = true)
@ToString
public class EGasPriceDTO {
    /**
     * 油号ID
     */
    private String oilId;
    /**
     * 油号
     */
    private String oilCode;
    /**
     * 1.汽油 2.柴油
     */
    private Integer oilType;
    /**
     * 国家价
     */
    private String countryPrice;
    /**
     * 油站挂牌价
     */
    private String stationPrice;
    /**
     * 优惠后单价
     */
    private String discountPrice;
    /**
     * 油枪号列表
     */
    @JsonProperty("oilgunCodes")
    private String[] oilGunCodes;

    /**
     * 同步过来的数据没有该字段，我们自己根据优惠价和油站价计算出来
     */
    private BigDecimal customerDiscount;

    public void freeData() {
        this.oilId = null;
        this.oilCode = null;
        this.oilType = null;
        this.countryPrice = null;
        this.stationPrice = null;
        this.discountPrice = null;
        this.oilGunCodes = null;
        this.customerDiscount = null;
    }
}